<template>
	<view class="page" :style="themeColor">
		<view class="flex benben-position-layout flex flex-wrap align-center accountCancellationRisk_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub accountCancellationRisk_fd0_0'>
				<view class='flex flex-wrap align-center'>
					<person></person>
				</view>
				<view class='flex flex-wrap align-stretch justify-center flex-sub'>
					<text class='accountCancellationRisk_fd0_0_c1_c0'>注销账号</text>
				</view>
				<view class='flex flex-wrap align-center accountCancellationRisk_fd0_0_c2'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<view style="padding: 8rpx 32rpx;position: fixed;width: 100%;z-index: 5;background: #fff;">
			<back></back>
		</view>

		<view class="flex flex-direction flex-wrap align-stretch accountCancellationRisk_flex_1">
			<view class="flex">
				<image style="width: 34rpx;height: 36rpx;margin-right: 16rpx;transform: translateY(2rpx);"
					:src='STATIC_URL+"84.png"' mode="aspectFill"></image>
				<text class='accountCancellationRisk_fd1_0'>账号注销</text>
			</view>

			<text class='accountCancellationRisk_fd1_1'>永久注销且无法恢复，请谨慎操作</text>
			<text class='accountCancellationRisk_fd1_2'>账号注销后将放弃以下权益：</text>
			<jyf-parser :html="parser1 | richTextFormat" class='accountCancellationRisk_fd1_11'></jyf-parser>
			<text class='accountCancellationRisk_fd1_4'>点击下方按钮，即表示你已阅读并了解以上风险</text>

		</view>


		<view
			class="flex flex-direction flex-wrap align-center justify-center benben-position-layout flex accountCancellationRisk_flex_2">
			<button class='accountCancellationRisk_fd2_0' @tap.stop="popupShow1681205077956=true">我已清楚风险，确定继续</button>
			<button class='accountCancellationRisk_fd2_1' @tap.stop="handleJumpDiy" data-type="back"
				data-url="3">返回</button>

		</view>
		<view :style="{height: '264rpx'}"></view>
		<benben-popup v-model="popupShow1681205077956" :mask="true" mode='center'>
			<!---注销弹窗确认flex布局开始-->
			<view class="flex flex-direction flex-wrap align-center accountCancellationRisk_flex_3">
				<text class='accountCancellationRisk_fd3_0'>请再次确认，你已了解注销风险， 并要继续执行该操作</text>
				<view class='flex flex-wrap align-center accountCancellationRisk_fd3_1'>
					<button class='accountCancellationRisk_fd3_1_c0'
						@tap.stop="popupShow1681205077956=false">取消</button>
					<button class='accountCancellationRisk_fd3_1_c1' @tap.stop="jumpFunc()">确定</button>
				</view>
			</view>

			<!---注销弹窗确认flex布局结束-->

		</benben-popup>


	</view>
</template>
<script>
	import back from "@/components/back/index.vue"
	import person from "@/components/person/index.vue"
	export default {
		components: {
			back,
			person
		},


		data() {
			return {
				"popupShow1681205077956": false,
				"type": "",
				"content": "",
				parser1: ''
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				type,
				content
			} = options
			if (type !== undefined) this.type = type
			if (content !== undefined) this.content = content
			console.log(this.content)
			console.log(this.type)
			this.getxieyi()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//风险文案
			async getxieyi() {
				let res = await this.$api.post(global.apiUrls.xieyi, {
					aid: 4
				});
				if (res.data.code != 1) {
					this.$message.info(res.data.msg)
					return
				}
				this.parser1 = res.data.data.content
			},
			//跳转页面
			async jumpFunc() {
				this.popupShow1681205077956 = false;
				let res = await this.$api.post(global.apiUrls.a64367e8eb9c7b, {
					type_id: this.type,
					reason: this.content
				});
				if (res.data.code != 1) {
					this.$message.info(res.data.msg)
					return
				}
				this.$message.info(res.data.msg)
				this.tim.logout();
				this.$store.commit('logout');
				// #ifdef APP-PLUS
				this.TUICallKit.logout();
				// #endif
				setTimeout(() => {
					uni.reLaunch({
						url: '/pages/tabBar/login/login'
					})
				}, 800)
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto !important;
	}

	.accountCancellationRisk_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.accountCancellationRisk_fd0_0_c2 {
		width: 32rpx;
		height: 32rpx;
	}

	.accountCancellationRisk_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.accountCancellationRisk_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.accountCancellationRisk_fd0_0 {
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.accountCancellationRisk_flex_1 {
		background: #fff;
		font-size: 32rpx;
		background-size: 100% auto !important;
		padding: 32rpx 32rpx 32rpx 32rpx;
		margin-top: 120rpx;
	}

	.accountCancellationRisk_fd1_4 {
		border-top: 1px solid #eee;
		font-size: 24rpx;
		font-weight: 400;
		color: var(--benbenFontColor4);
		margin: 40rpx 0rpx 0rpx 0rpx;
		line-height: 32rpx;
		padding: 32rpx 0rpx 0rpx 0rpx;
	}

	.accountCancellationRisk_fd1_2 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: #333333;
		padding: 56rpx 0rpx 24rpx 0rpx;
	}

	.accountCancellationRisk_fd1_1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
	}

	.accountCancellationRisk_fd1_11 {
		line-height: 40rpx;
		font-size: 30rpx;
		font-weight: 500;
		color: #333333;
	}

	.accountCancellationRisk_fd1_0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: #333333;
		padding: 0rpx 0rpx 24rpx 0rpx;
	}

	.accountCancellationRisk_flex_2 {
		width: 750rpx;
		height: 264rpx;
		overflow: hidden;
		z-index: 5;
		bottom: calc(0rpx + var(--window-bottom));
	}

	.accountCancellationRisk_fd2_1 {
		border: 1px solid #333333;
		background: #fff;
		border-radius: 50rpx 50rpx 50rpx 50rpx;
		font-size: 32rpx;
		color: rgba(51, 51, 51, 1);
		width: 640rpx;
		height: 88rpx;
		line-height: 88rpx;
		font-weight: 400;
		margin: 32rpx 0rpx 0rpx 0rpx;
	}

	.accountCancellationRisk_fd2_0 {
		background: var(--benbenbgColor2);
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: #fff;
		width: 640rpx;
		height: 88rpx;
		line-height: 88rpx;
		font-weight: 400;
		padding: 0rpx 0rpx 0rpx 0rpx;
	}

	.accountCancellationRisk_flex_3 {
		background: #fff;
		width: 540rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.accountCancellationRisk_fd3_1_c1 {
		border-top: 1px solid #eee;
		border-left: 1px solid #eee;
		background: #fff;
		line-height: 110rpx;
		border-radius: 0rpx 0rpx 16rpx 0rpx;
		font-size: 32rpx;
		color: rgba(85, 0, 0, 1.0);
		width: 270rpx;
	}

	.accountCancellationRisk_fd3_1_c0 {
		border-top: 1px solid #eee;
		background: #fff;
		line-height: 110rpx;
		border-radius: 0rpx 0rpx 0rpx 16rpx;
		font-size: 32rpx;
		color: rgba(153, 153, 153, 1);
		padding: 0rpx 103rpx 0rpx 103rpx;
	}

	.accountCancellationRisk_fd3_1 {
		margin: 33rpx 0rpx 0rpx 0rpx;
	}

	.accountCancellationRisk_fd3_0 {
		line-height: 52rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
		text-align: center;
		margin: 52rpx 60rpx 0rpx 60rpx;
	}
</style>